package com.yay.vmukti;

import android.app.Activity;
import android.net.Uri;
import android.os.Bundle;
import android.widget.MediaController;
import android.widget.VideoView;

public class HomeActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_home);
        
        VideoView videoView = (VideoView) findViewById(R.id.videoView);
        /*String path="rtsp://127.0.0.1/1.vms";
        MediaController mediaController = new MediaController(this);
        mediaController.setMediaPlayer(videoView);
        videoView.setVideoPath(path);
        videoView.setMediaController(mediaController);
        videoView.requestFocus();
        videoView.start();
        mediaController.show();*/
        
        
        MediaController mediaController = new MediaController(this);
        mediaController.setAnchorView(videoView);
        // Set video link (mp4 format )
        Uri video = Uri.parse("rtsp://172.26.24.10/1.mp4");
        videoView.setMediaController(mediaController);
        videoView.setVideoURI(video);
        videoView.start();
    
    }
}